package com.aiyan.edu.api.gateway;

import com.aiyan.edu.framework.domain.gateway.GwRoute;
import com.aiyan.edu.framework.domain.gateway.request.QueryRouteRequest;
import com.aiyan.edu.framework.domain.gateway.response.GatewayResponseResult;
import com.aiyan.edu.framework.model.response.QueryResponseResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;

/**
 * @author: zqzhou
 * @create: 2019/12/01 17:21
 **/
@Api(value = "路由管理接口", description = "提供路由配置的增删改查", tags = {"路由管理"})
public interface RoutesControllerApi {

    @ApiOperation("保存路由")
    public GatewayResponseResult<GwRoute> save(GwRoute gwRoute);

    @ApiOperation("查询路由列表")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "page", value = "页码", required = true, paramType = "path", dataType = "int"),
            @ApiImplicitParam(name = "size", value = "每页数据条数", required = true, paramType = "path", dataType = "int")
    })
    public QueryResponseResult<GwRoute> list(int page, int size, QueryRouteRequest queryRouteRequest);

    @ApiOperation("路由发布")
    @ApiImplicitParam(name = "routeId", value = "路由id", required = true, paramType = "path", dataType = "String")
    public GatewayResponseResult<GwRoute> post(String routeId);
}
